AutoIndex Version 1.6.5
Author Bamaboy

-=Shouts=-
Ami/Naru			        - helped me learn c++ include her in everything lol
irc.vidgamechat.net (#genscripts) 	- everyone there for just being around come join us some time

-=Description=-
Basicly I made this as a demo for WhileFix.dll 3.0 to test the FindFile function however I
decided someone might have a good use for it since it would make a more than decent @find script
in my opinon at least.  Basicly the script just indexes a list of directories in the background
at a specific time during the day so mIRC does not lock up while the indexing is going on and each
file is stored in a hash table for later use.  It also supports dumping the files to a text file
if a user wants to have a list of files externally stored instead of just in the hashtable

-=Options Dialog Desc=-
Tab 1
Add Dir - Adds a Directory to the list of dirs to index
Delete dir - deletes a directory from the list of dirs to index
Info box - lets you know the last time it was indexed
Time Box - time must be in the format of XX:XX in 12 hour format
	   this time is used by the app to determine when to index daily
AM/PM 	 - allows you to choose rather the time is in AM or PM
Auto Index On - if on the Indexer runs a timer to check if it is time to index otherwise you must manually index

Tab 2
Enable File Dump 	 - Enables dumping of files into a selected file
...		 - brings up the file selection dialog to select the dump file
Use Default File	 - Sets the file to $ScriptDir + YourCurrentNick + -FileIndex.txt
Dump Format	 - Allows you to set the format that files are added to the dump file for example
		 - You could set the dump format to something like: /ctcp $me $nopath(&file)
		 - The custom identifiers you have at your disposal are:
		 - &file - The file being added
		 - &num - the number of the file being added
		 - Also note that any mIRC identifier that SHOULD be valid is valid here, so like $file(&file).size etc is all valid (:
		 - This opens a lot up in the way of custom aliases so you could do something like /ctcp $me $myalias(&file) and jsut ahve the return of my serverscript be the $1- so that it works like normal, just food for thought
Index Behavior 	 - This is important and changes how the indexer behaves when it indexs its directory list
		 Multi Directory At Once - this starts a thread for each directory in the index list and consequently
					 - shoudl be faster for many files; however, as a disadvantage it dumps its list
					 - of files to the hash table and dump file in the order they reach the callback
					 - which consequently is unpredictable
		 One Directory At once	 - this only indexs one directory at a time; that is to say as one directory 
					 - finishes a new directory begins indexing, this is inheritly slower than multi
					 - directory since it is one at a time; however, when it dumps its list to a file
					 - it is in order by directory which is good for certain applications as a note
					 - the speed difference shoudl only be noticeable if indexing large directories

Tab 3
Max Results 	 - how many results are returned before displaying a msg telling the user to be more specfic
End Tag		 - The last thing sent to a user who does @find or ctcp search
		 - no custom identifiers are available here; however, any mIRC identifier that should be valid is evaluated before outputed
Enable @find	 - without this checked @find is disabled
Enable ctcp search - Allows the user to use /ctcp #channel search as the same as @find
Certain Chans	 - Allows the user of @find in only certain channels, its not rocket science you can figure it out
Msg No Files	 - Sends the user a msg that no files were found matching there criteria
Highlight Find	 - highlights the search text before outputting it to the query so that its easy to spot
Find Format Edit - Okay this works exactly like the dump format except it allows the formatting of files that are
		 - Sent as @find results by the built in @find system... Identifiers you can use are 
		 - &file - c:\filepath\filename.ext
		 - &num  - Number result it is
		 - Plus any alias you want to custom do or anything pretty much it evaluates the line after replacing

-=Menu=-
Force Index	- forces an index to occur without checking (this will keep the indexer from auto indexing via the timer
		  since it has already indexed that day)
File Dumping	- allows you to turn on and off file dumping via easy menu access
Options		- opens the options dialog

-=Notes=-
I woudl like to take a minute to explain how the auto indexer knows when to index... first it has a timer that checks every
5 minutes that means if you set the time for it to index at 8:37 in the morning it might index at 8:37 or it might index as late as 8:42
no matter what it wont kill you its just so the timer isnt over bearing.  As another note the reason i did it with a timer every 5 minutes instead
of useing a timer that is fired at a specific time is so i can catch circumstances where the indexer was closed or what not or if its 
not 8:37 when you start mIRC if you want to do it the other way the ability is there just dont complain if you brake my script trying
to change it (: Also it was Much easier on me since this way the timer will just check all the time and i will never have to stop it
and reset it to a different time if the user changes the time he or she wants to index Next when it is time to check to index it first
checks if there has been a manual index today... if there has it doesnt index since it would just be stupid imo to index if
you manually indexed already... if you want to take that out feel free to comment it out that will keep it from caring and as a 
side effect make it index ALL THE TIME once its past your designated time so dont touch it lol.  Once this pre-requiste is met
that there have been no indexs on that day, it checks to see if it is past the time set to index daily if it is it indexes
and goes on about its business.  The behavior is defined of course if your mIRC is closed and while the time set to index
passes, once mIRC is again restarted it will index the first time the timer is triggered since it notices its past the time
of course provided there hasnt been a manual index that day in the first place (:

-=Bugs=-
Bugs are probably not going to be uncommon i did my best to test it throughly but nothing tests a script better than the
test of time even if that is a bit cliche (however you spell it) so please email bug reports to bamaboy1217@gmail.com or
join irc.vidgamechat.net #genscripts and if im not there either memo bamaboy and leave a note or hang around the channel